package com.hwua.service.impl;

import com.hwua.dao.ScoreDao;
import com.hwua.dao.StudentDao;
import com.hwua.dao.impl.ScoreDaoImpl;
import com.hwua.dao.impl.StudentDaoImpl;
import com.hwua.entity.Score;
import com.hwua.entity.Student;
import com.hwua.service.StudentService;
import com.hwua.util.DBHelper;

import java.sql.SQLException;
import java.util.List;

/**
 * @author CQY
 */
public class StudentServiceImpl implements StudentService{
    StudentDao dao=new StudentDaoImpl();
    @Override
    public List<Student> findAll() {
        return dao.findAll();
    }

    @Override
    public int save(Student student) {
        return dao.save(student);
    }

    @Override
    public int delete(String id) throws SQLException {

        return dao.delete(id);
    }

    @Override
    public int update(Student student) {
        return dao.update(student);
    }

    @Override
    public List<Student> findSearch(String keyword) {
        return dao.findSearch(keyword);
    }
}
